package avl;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:咭咭熊
 * Date:2021 - 08 - 20
 * Time:19:01
 */
/***
 * 二叉平衡树
 * 节点定义：不包含value
 * key的类型为long
 * 节点中需要保存两个字段
 * (1)以该节点为根的子树的平衡因子bf
 * (2)该节点的父节点parent
 */

public class AVLNode {
    public long key;
    public AVLNode left;
    public AVLNode right;

    //AVL 树中的特殊字段
    public  int bf;
    public AVLNode parent;

    @Override
    public String toString() {
        return "AVLNode{" +
                "key=" + key +
                "bf=" + bf +
                '}';
    }


}
